- return unless ldap_enabled?

- form = local_assigns.fetch(:form)

.form-group
  = form.label :allow_group_owners_to_manage_ldap, _('LDAP settings'), class: 'label-bold'

  - help_text_lock = _('If checked, new group memberships and permissions can only be added via LDAP synchronization')
  - help_link_lock = link_to sprite_icon('question-o'), help_page_path('administration/auth/ldap/ldap_synchronization.md', anchor: 'global-group-memberships-lock')
  = form.gitlab_ui_checkbox_component :lock_memberships_to_ldap,
    _('Lock memberships to LDAP synchronization'),
    help_text: '%{help_text} %{help_link}'.html_safe % { help_text: help_text_lock, help_link: help_link_lock }

  - help_text_group = _('If checked, group owners can manage LDAP group links and LDAP member overrides')
  - help_link_group = link_to sprite_icon('question-o'), help_page_path('administration/auth/ldap/index.md')
  = form.gitlab_ui_checkbox_component :allow_group_owners_to_manage_ldap,
    _('Allow group owners to manage LDAP-related settings'),
    help_text: '%{help_text} %{help_link}'.html_safe % { help_text: help_text_group, help_link: help_link_group }
